/*
 *   Copyright (c) 2010-2022, SIUFUNG
 */
package net.siufung.market.base.user.controller.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.extern.slf4j.Slf4j;
import net.siufung.core.utils.CopyUtil;
import net.siufung.market.base.user.mapper.entity.UserDetail;

import java.io.Serializable;

/**
 * <p>
 * 系统用户详细 默认数据传参对象
 * </p>
 * @author 陈建峰
 * @date 2023-02-06 23:25:52
 * @since v1.0.0
 */
@Slf4j
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="UserDetailDto", description="系统用户详细默认数据传输对象")
public class UserDetailDto implements Serializable {

    private static final long serialVersionUID = -1163027472637032280L;
    /**
     * 主键ID
     */
    @ApiModelProperty(value = "主键ID")
    private Integer userId;

    /**
     * 用户电话
     */
    @ApiModelProperty(value = "用户电话")
    private String userPhone;

    /**
     * 身份证号码
     */
    @ApiModelProperty(value = "身份证号码")
    private String userIdCard;

    /**
     * 用户email
     */
    @ApiModelProperty(value = "用户email")
    private String email;

    /**
     * 用户性别
     */
    @ApiModelProperty(value = "用户性别")
    private String sex;

    /**
     * 用户头像
     */
    @ApiModelProperty(value = "用户头像")
    private String avatar;

    /**
     * 用户生日
     */
    @ApiModelProperty(value = "用户生日")
    private String birthday;

    /**
     * 用户描述
     */
    @ApiModelProperty(value = "用户描述")
    private String description;

    /**
     * 租户ID
     */
    @ApiModelProperty(value = "租户ID")
    private Integer tenantId;




    /**
     * 转化成数据库实体
     * @return UserDetail
     */
    public UserDetail to(){
        UserDetail userDetail = new UserDetail();
        CopyUtil.copyProperties(this, userDetail);
        return userDetail;
    }
}